home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / interfaces / PInterface Translator / OCE Interfaces / OCEMessaging.p < prev    next >
Encoding:
Text File  |  1993-09-16  |  29.3 KB  |  1,277 lines  |  [TEXT/MPS ]

  1. {***********************************************************
  2.  
  3. Created: Monday, February 8, 1993 at 7:40PM
  4.  OCEMessaging.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.     ••• Apple Confidential •••
  8.     ••• Provided with AOCE Beta seed under license agreement with   •••
  9.     ••• Apple Computer, Inc.  Use for any purpose other than        •••
  10.     ••• development of AOCE-based Macintosh products is a violation •••
  11.     ••• of the license agreement.                                   •••
  12.  
  13.   Copyright Apple Computer, Inc. 1990-1993
  14.   All rights reserved
  15.  
  16. ***********************************************************}
  17.  
  18.  
  19. {$IFC UNDEFINED UsingIncludes}
  20. {$SETC UsingIncludes:= 0}
  21. {$ENDC}
  22.  
  23. {$IFC NOT UsingIncludes}
  24.     UNIT OCEMessaging;
  25.     INTERFACE
  26. {$ENDC}
  27.  
  28. {$IFC UNDEFINED UsingOCEMessaging}
  29. {$SETC UsingOCEMessaging:= 1}
  30.  
  31. {$I+}
  32. {$SETC OCEMessagingIncludes:= UsingIncludes}
  33. {$SETC UsingIncludes:= 1}
  34.  
  35.  
  36. {$IFC UNDEFINED UsingDigitalSignature}
  37. {$I DigitalSignature.p}
  38. {$ENDC}
  39.  
  40. {$IFC UNDEFINED UsingFiles}
  41. {$I $$Shell(PInterfaces)Files.p}
  42. {$ENDC}
  43.  
  44. {$IFC UNDEFINED UsingOCE}
  45. {$I OCE.p}
  46. {$ENDC}
  47.  
  48. {$IFC UNDEFINED UsingOCEAuthDir}
  49. {$I OCEAuthDir.p}
  50. {$ENDC}
  51.  
  52. {$IFC UNDEFINED UsingTypes}
  53. {$I $$Shell(PInterfaces)Types.p}
  54. {$ENDC}
  55.  
  56. {$SETC UsingIncludes:= OCEMessagingIncludes}
  57.  
  58.  
  59.  
  60. {****************************************************************************}
  61. { Definitions common to OCEMessaging and to OCEMail. These relate to addressing,
  62. message ids and priorities, etc. }
  63.  
  64.  
  65. { Values of IPMPriority }
  66. CONST
  67. kIPMAnyPriority = 0;        { FOR FILTER ONLY }
  68. kIPMNormalPriority = 1;
  69.  
  70.  
  71.  
  72. TYPE
  73. IPMPriority = Byte;
  74.  
  75.  
  76. CONST
  77. { Values of IPMAccessMode }
  78. kIPMAtMark = 0;
  79. kIPMFromStart = 1;
  80. kIPMFromLEOM = 2;
  81. kIPMFromMark = 3;
  82.  
  83. TYPE
  84. IPMAccessMode = INTEGER;
  85.  
  86.  
  87. CONST
  88. kIPMUpdateMsgBit = 4;
  89. kIPMNewMsgBit = 5;
  90. kIPMDeleteMsgBit = 6;
  91.  
  92.  
  93.  
  94. { Values of IPMNotificationType }
  95. kIPMUpdateMsgMask    = $10;  {1<<kIPMUpdateMsgBit}
  96. kIPMNewMsgMask        = $20;  {1<<kIPMNewMsgBit}
  97. kIPMDeleteMsgMask    = $40;  {1<<kIPMDeleteMsgBit}
  98.  
  99.  
  100.  
  101. TYPE
  102. IPMNotificationType = Byte;
  103.  
  104.  
  105. CONST
  106. { Values of IPMSenderTag }
  107. kIPMSenderRStringTag = 0;
  108. kIPMSenderRecordIDTag = 1;
  109.  
  110. TYPE
  111. IPMSenderTag = INTEGER;
  112.  
  113.  
  114. CONST
  115. kIPMFromDistListBit = 0;
  116. kIPMDummyRecBit        = 1;
  117. kIPMFeedbackRecBit    = 2;    { should be redirected to feedback queue }
  118. kIPMReporterRecBit    = 3;    { should be redirected to reporter original queue }
  119.  
  120.  
  121. { Values of OCERecipientOffsetFlags }
  122. kIPMFromDistListMask            = $01;  {1<<kIPMFromDistListBit}
  123. kIPMDummyRecMask                = $02;  {1<<kIPMDummyRecBit}
  124. kIPMFeedbackRecMask                = $04;  {1<<kIPMFeedbackRecBit}
  125. kIPMReporterRecMask                = $08;  {1<<kIPMReporterRecBit}
  126.  
  127.  
  128.  
  129. TYPE
  130. OCERecipientOffsetFlags = Byte;
  131.  
  132.  
  133. OCECreatorType = RECORD
  134.     msgCreator: OSType;
  135.     msgType: OSType;
  136.     END;
  137.  
  138.  
  139.  
  140.  
  141. CONST
  142. kIPMTypeWildCard        = 'ipmw';
  143.  
  144. kIPMFamilyUnspecified    = 0;
  145. kIPMFamilyWildCard        = '????';
  146.  
  147. { well known signature }
  148. kIPMSignature            = 'ipms';    { base type }
  149.  
  150. { well known message types }
  151. kIPMReportNotify        = 'rptn';    { routing feedback }
  152.  
  153. { well known message block types }
  154. kIPMEnclosedMsgType        = 'emsg';    { enclosed (nested) message }
  155. kIPMReportInfo            = 'rpti';    { recipient information }
  156. kIPMDigitalSignature     = 'dsig';    { digital signature }
  157.  
  158. { Values of IPMMsgFormat }
  159. kIPMOSFormatType = 1;
  160. kIPMStringFormatType = 2;
  161.  
  162.  
  163.  
  164. TYPE
  165. IPMMsgFormat = INTEGER;
  166.  
  167. IPMStringMsgType = Str32;
  168.  
  169. IPMMsgType = RECORD
  170.     format: IPMMsgFormat;                { IPMMsgFormat}
  171.     CASE INTEGER OF
  172.         1: (msgOSType: OCECreatorType);
  173.         2: (msgStrType: IPMStringMsgType);
  174.     END;
  175.  
  176.  
  177.  
  178. {
  179. Following are the known extension values for IPM addresses handled by Apple.
  180. We define the definition of the entn extension below.
  181. }
  182.  
  183. CONST
  184. kOCEalanXtn            = 'alan';
  185. kOCEentnXtn            = 'entn';            { entn = entity name (DSSpec: aka) }
  186. kOCEaphnXtn            = 'aphn';
  187.  
  188.  
  189.  
  190. {
  191. Following are the specific definitions for the extension for the standard
  192. OCEMail 'entn' addresses.  [Note, the actual extension is formatted as in
  193. IPMEntityNameExtension.]
  194. }
  195.  
  196. { entn extension forms }
  197. kOCEAddrXtn            = 'addr';
  198. kOCEQnamXtn            = 'qnam';
  199. kOCEAttrXtn            = 'attr';            { an attribute specification }
  200. kOCESpAtXtn            = 'spat';            { specific attribute }
  201.  
  202. {
  203. Following are the specific definitions for standard
  204. OCEMail 'aphn' extension value.  
  205.  
  206. All RStrings here are packed (e.g. truncated to length) and even padded (e.g.
  207. if length odd, then a pad byte (zero) should be introduced before the next field).
  208.  
  209. The extension value is in the packed form of the following structure:
  210.     RString        phoneNumber;
  211.     RString        modemType;
  212.     Str32        queueuName;
  213.  
  214. The body of phoneNumber compound RString is in the packed form of the following structure:
  215.     short         subType;
  216.     RString     countryCode;                // used when subType == kOCEUseHandyDial
  217.     RString        areaCode;                    // used when subType == kOCEUseHandyDial
  218.     RString        phone;                        // used when subType == kOCEUseHandyDial
  219.     RString        postFix;                    // used when subType == kOCEUseHandyDial
  220.     RString        nonHandyDialString;            // used when subType == kOCEDontUseHandyDial
  221. }
  222.  
  223. { phoneNumber sub type constants }
  224. CONST
  225. kOCEUseHandyDial        = 1;
  226. kOCEDontUseHandyDial    = 2;
  227.  
  228.  
  229.  
  230. TYPE
  231. ProtoOCEPackedRecipient = RECORD
  232.     dataLength:    INTEGER;
  233.     END;
  234.  
  235. CONST
  236. kOCEPackedRecipientMaxBytes    = (4096 - sizeof(ProtoOCEPackedRecipient));
  237.  
  238.  
  239. TYPE
  240. OCEPackedRecipient = RECORD
  241.     dataLength:    INTEGER;
  242.  
  243.     data: PACKED ARRAY[1..kOCEPackedRecipientMaxBytes] OF Byte;
  244.     END;
  245.  
  246.  
  247. IPMEntnQueueExtension = RECORD
  248.     queueName: Str32;
  249.     END;
  250.  
  251.  
  252. IPMEntnAttributeExtension = RECORD                { kOCEAttrXtn }
  253.     attributeName: AttributeType;
  254.     END;
  255.  
  256.  
  257. IPMEntnSpecificAttributeExtension = RECORD        { kOCESpAtXtn }
  258.     attributeCreationID: AttributeCreationID;
  259.     attributeName: AttributeType;
  260.     END;
  261.  
  262.  
  263. { All IPM entn extensions fit within the following }
  264.  
  265. IPMEntityNameExtension = RECORD
  266.     subExtensionType: OSType;
  267.     CASE INTEGER OF
  268.         1:    (specificAttribute: IPMEntnSpecificAttributeExtension);
  269.         2:    (attribute: IPMEntnAttributeExtension);
  270.         3:    (queue: IPMEntnQueueExtension);
  271.     END;
  272.  
  273.  
  274. { addresses with kIPMNBPXtn should specify this nbp type }
  275. CONST
  276. kIPMWSReceiverNBPType = 'MsgReceiver';
  277.  
  278. TYPE
  279. IPMMsgID = RECORD
  280.     id: ARRAY[1..4] OF LONGINT;
  281.     END;
  282.  
  283.  
  284.  
  285. IPMHdrOffsets = LONGINT;
  286.  
  287. OCERecipientOffset = PACKED RECORD
  288.     offset: IPMHdrOffsets;
  289.     size: INTEGER;
  290.     originalIndex: INTEGER;
  291.     resolutionIndex: INTEGER;
  292.     resolutionCount: Byte;
  293.     flags: OCERecipientOffsetFlags;
  294.     END;
  295.  
  296.  
  297.  
  298. CONST
  299. { Values of IPMHeaderSelector }
  300. kIPMTOC = 0;
  301. kIPMSender = 1;
  302. kIPMProcessHint = 2;
  303. kIPMMessageTitle = 3;
  304. kIPMMessageType = 4;
  305. kIPMFullHeader = 6;
  306. kIPMFixedInfo = 7;
  307.  
  308.  
  309.  
  310. TYPE
  311. IPMHeaderSelector = Byte;
  312.  
  313. IPMSender = RECORD
  314.     sendTag: IPMSenderTag;
  315.     CASE INTEGER OF
  316.         1:    (rString: RString);
  317.         2:    (rid: PackedRecordID);
  318.     END;
  319.  
  320. OCERecipient = DSSpec;
  321.  
  322.  
  323.  
  324.  
  325.  
  326. {****************************************************************************}
  327. { Definitions specific to OCEMessaging }
  328.  
  329. IPMContextRef = LONGINT;
  330. IPMQueueRef = LONGINT;
  331. IPMMsgRef = LONGINT;
  332. IPMSeqNum = LONGINT;
  333. IPMProcHint = Str32;
  334. IPMQueueName = Str32;
  335.  
  336.  
  337. IPMNoteProcPtr = ProcPtr;
  338.     { FUNCTION IPMNoteProcPtr(queue: IPMQueueRef; seqNum: IPMSeqNum;
  339.          notificationType: IPMNotificationType; userData: LONGINT): void;}
  340.  
  341.  
  342. IPMFixedHdrInfo = PACKED RECORD
  343.     version: INTEGER;
  344.     authenticated: BOOLEAN;
  345.     signatureEnclosed: BOOLEAN;        {  digital signature enclosed }
  346.     msgSize: LONGINT;
  347.     notification: IPMNotificationType;
  348.     priority: IPMPriority;
  349.     blockCount: INTEGER;
  350.     originalRcptCount: INTEGER;        {        original number of recipients }
  351.     rcptCount: INTEGER;                {        current number of recipients }
  352.     refCon: LONGINT;                {        Client defined data }
  353.     resolutionCount: INTEGER;        {        Number of times that we have resolved an address }
  354.     hopCount: INTEGER;                {        How many hops we have visited so far }
  355.     creationTime: UTCTime;            {        Time when it was created }
  356.     msgID: IPMMsgID;
  357.     family: OSType;                    {        family this msg belongs (e.g. mail) }
  358.     END;
  359.  
  360.  
  361. CONST
  362. kIPMDeliveryNotificationBit        = 0;
  363. kIPMNonDeliveryNotificationBit    = 1;
  364. kIPMEncloseOriginalBit            = 2;
  365. kIPMSummaryReportBit            = 3;
  366. kIPMOriginalOnlyOnErrorBit        = 4;        { modify enclose original to only on error }
  367.  
  368.  
  369.  
  370. kIPMNoNotificationMask            = $00;
  371. kIPMDeliveryNotificationMask    = $01;  {1<<kIPMDeliveryNotificationBit}
  372. kIPMNonDeliveryNotificationMask    = $02;  {1<<kIPMNonDeliveryNotificationBit}
  373. kIPMDontEncloseOriginalMask        = $00;
  374. kIPMEncloseOriginalMask            = $04;  {1<<kIPMEncloseOriginalBit}
  375. kIPMImmediateReportMask            = $00;
  376. kIPMSummaryReportMask            = $08;  {1<<kIPMSummaryReportBit}
  377. kIPMOriginalOnlyOnErrorMask        = $10;  {1<<kIPMOriginalOnlyOnErrorBit}
  378. kIPMEncloseOriginalOnErrorMask    = kIPMOriginalOnlyOnErrorMask + kIPMEncloseOriginalMask;
  379.  
  380.  
  381.  
  382.  
  383. {***********************************************************************}
  384. {
  385. This is the structure that will be returned by enumerate and getmsginfo
  386. This definition is just to give you a template, the position of msgType
  387. is variable since this is a packed structure.  procHint and msgType are
  388. packed and even length padded.
  389. }
  390. TYPE
  391. IPMMsgInfo = PACKED RECORD
  392.     sequenceNum: IPMSeqNum;
  393.     userData: LONGINT;
  394.     respIndex: INTEGER;
  395.     padByte: Byte;
  396.     priority: IPMPriority;
  397.     msgSize: LONGINT;
  398.     originalRcptCount: INTEGER;
  399.     rcptCount: INTEGER;
  400.     creationTime: UTCTime;
  401.     msgID: IPMMsgID;
  402.     family: OSType;                { family this msg belongs to (e.g. mail) }
  403.     procHint: IPMProcHint;
  404.     msgType: IPMMsgType;
  405.     END;
  406.  
  407. IPMBlockType = OCECreatorType;
  408.  
  409. IPMTOC = RECORD
  410.     blockType: IPMBlockType;
  411.     blockOffset: LONGINT;
  412.     blockSize: LONGINT;
  413.     blockRefCon: LONGINT;
  414.     END;
  415.  
  416.  
  417.  
  418. {
  419. The following structure is just to describe the layout of the SingleFilter.
  420. Each field should be packed and word aligned when passed to the IPM ToolBox.
  421. }
  422.  
  423. IPMSingleFilter = PACKED RECORD
  424.     priority: IPMPriority;
  425.     padByte: Byte;
  426.     family: OSType;                { family this msg belongs (e.g. mail), '????' for all }
  427.     script: ScriptCode;            { Language Identifier }
  428.     hint: IPMProcHint;
  429.     msgType: IPMMsgType;
  430.     END;
  431.  
  432.  
  433. IPMFilter = RECORD
  434.     count: INTEGER;
  435.     sFilters: ARRAY[1..1] OF IPMSingleFilter;
  436.     END;
  437.  
  438.  
  439. {***********************************************************************}
  440. {
  441. Following structures define the “start” of a recipient report block and the
  442. elements of the array respectively.
  443. }
  444.  
  445. IPMReportBlockHeader = RECORD
  446.     msgID: IPMMsgID;            { message id of the original }
  447.     creationTime: UTCTime;    { creation time of the report }
  448.     END;
  449.  
  450.  
  451. OCERecipientReport = RECORD
  452.     rcptIndex: INTEGER;        { index of recipient in original message }
  453.     result: OSErr;            { result of sending letter to this recipient}
  454.     END;
  455.  
  456. {***********************************************************************}
  457. IPMParamHeader = RECORD
  458.     qLink: Ptr;
  459.     reservedH1: LONGINT;
  460.     reservedH2: LONGINT;
  461.     ioCompletion: ProcPtr;
  462.     ioResult: OSErr;
  463.     saveA5: LONGINT;
  464.     reqCode: INTEGER;
  465.     END;
  466.  
  467.  
  468. IPMOpenContextPB = RECORD
  469.     qLink: Ptr;
  470.     reservedH1: LONGINT;
  471.     reservedH2: LONGINT;
  472.     ioCompletion: ProcPtr;
  473.     ioResult: OSErr;
  474.     saveA5: LONGINT;
  475.     reqCode: INTEGER;
  476.  
  477.     contextRef: IPMContextRef;        { <--  Context reference to be used in further calls}
  478.     END;
  479.  
  480. IPMCloseContextPB = IPMOpenContextPB;
  481.  
  482.  
  483. IPMCreateQueuePB = RECORD
  484.     qLink: Ptr;
  485.     reservedH1: LONGINT;
  486.     reservedH2: LONGINT;
  487.     ioCompletion: ProcPtr;
  488.     ioResult: OSErr;
  489.     saveA5: LONGINT;
  490.     reqCode: INTEGER;
  491.  
  492.     filler1: LONGINT;
  493.     queue: ^OCERecipient;
  494.     identity: AuthIdentity;        { used only if queue is remote }
  495.     owner: ^PackedRecordID;            { used only if queue is remote }
  496.     END;
  497.  
  498. { For createqueue and deletequeue only queue and identity are used }
  499. IPMDeleteQueuePB = IPMCreateQueuePB;
  500.  
  501.  
  502. IPMOpenQueuePB = PACKED RECORD
  503.     qLink: Ptr;
  504.     reservedH1: LONGINT;
  505.     reservedH2: LONGINT;
  506.     ioCompletion: ProcPtr;
  507.     ioResult: OSErr;
  508.     saveA5: LONGINT;
  509.     reqCode: INTEGER;
  510.  
  511.     contextRef: IPMContextRef;
  512.     queue: ^OCERecipient;
  513.     identity: AuthIdentity;
  514.     filter: ^IPMFilter;
  515.     newQueueRef: IPMQueueRef;
  516.     notificationProc: IPMNoteProcPtr;
  517.     userData: LONGINT;
  518.     noteType: IPMNotificationType;
  519.     padByte: Byte;
  520.     reserved: LONGINT;
  521.     reserved2: LONGINT;
  522.     END;
  523.  
  524.  
  525. IPMCloseQueuePB = RECORD
  526.     qLink: Ptr;
  527.     reservedH1: LONGINT;
  528.     reservedH2: LONGINT;
  529.     ioCompletion: ProcPtr;
  530.     ioResult: OSErr;
  531.     saveA5: LONGINT;
  532.     reqCode: INTEGER;
  533.  
  534.     queueRef: IPMQueueRef;
  535.     END;
  536.  
  537.  
  538. IPMEnumerateQueuePB = RECORD
  539.     qLink: Ptr;
  540.     reservedH1: LONGINT;
  541.     reservedH2: LONGINT;
  542.     ioCompletion: ProcPtr;
  543.     ioResult: OSErr;
  544.     saveA5: LONGINT;
  545.     reqCode: INTEGER;
  546.  
  547.     queueRef: IPMQueueRef;
  548.     startSeqNum: IPMSeqNum;
  549.     getProcHint: BOOLEAN;
  550.     getMsgType: BOOLEAN;
  551.     filler: INTEGER;
  552.     filter: ^IPMFilter;
  553.     numToGet: INTEGER;
  554.     numGotten: INTEGER;
  555.     enumCount: LONGINT;
  556.     enumBuffer: Ptr;        { will be packed array of IPMMsgInfo }
  557.     actEnumCount: LONGINT;
  558.     END;
  559.  
  560. IPMChangeQueueFilterPB = IPMEnumerateQueuePB;
  561.  
  562.  
  563. IPMDeleteMsgRangePB = RECORD
  564.     qLink: Ptr;
  565.     reservedH1: LONGINT;
  566.     reservedH2: LONGINT;
  567.     ioCompletion: ProcPtr;
  568.     ioResult: OSErr;
  569.     saveA5: LONGINT;
  570.     reqCode: INTEGER;
  571.  
  572.     queueRef: IPMQueueRef;
  573.     startSeqNum: IPMSeqNum;
  574.     endSeqNum: IPMSeqNum;
  575.     lastSeqNum: IPMSeqNum;
  576.     END;
  577.  
  578.  
  579.  
  580. IPMOpenMsgPB = PACKED RECORD
  581.     qLink: Ptr;
  582.     reservedH1: LONGINT;
  583.     reservedH2: LONGINT;
  584.     ioCompletion: ProcPtr;
  585.     ioResult: OSErr;
  586.     saveA5: LONGINT;
  587.     reqCode: INTEGER;
  588.  
  589.     queueRef: IPMQueueRef;
  590.     sequenceNum: IPMSeqNum;
  591.     newMsgRef: IPMMsgRef;
  592.     actualSeqNum: IPMSeqNum;
  593.     exactMatch: BOOLEAN;
  594.     padByte: Byte;
  595.     reserved: LONGINT;
  596.     END;
  597.  
  598.  
  599.  
  600. IPMOpenHFSMsgPB = RECORD
  601.     qLink: Ptr;
  602.     reservedH1: LONGINT;
  603.     reservedH2: LONGINT;
  604.     ioCompletion: ProcPtr;
  605.     ioResult: OSErr;
  606.     saveA5: LONGINT;
  607.     reqCode: INTEGER;
  608.  
  609.     hfsPath: ^FSSpec;
  610.     filler: LONGINT;
  611.     newMsgRef: IPMMsgRef;
  612.     filler2: LONGINT;
  613.     filler3: Byte;
  614.     reserved: LONGINT;
  615.     END;
  616.  
  617.  
  618.  
  619. IPMOpenBlockAsMsgPB = RECORD
  620.     qLink: Ptr;
  621.     reservedH1: LONGINT;
  622.     reservedH2: LONGINT;
  623.     ioCompletion: ProcPtr;
  624.     ioResult: OSErr;
  625.     saveA5: LONGINT;
  626.     reqCode: INTEGER;
  627.  
  628.     msgRef: IPMMsgRef;
  629.     filler: LONGINT;
  630.     newMsgRef: IPMMsgRef;
  631.     filler2: ARRAY[1..7] OF INTEGER;
  632.     blockIndex: INTEGER;
  633.     END;
  634.  
  635.  
  636.  
  637. IPMCloseMsgPB = RECORD
  638.     qLink: Ptr;
  639.     reservedH1: LONGINT;
  640.     reservedH2: LONGINT;
  641.     ioCompletion: ProcPtr;
  642.     ioResult: OSErr;
  643.     saveA5: LONGINT;
  644.     reqCode: INTEGER;
  645.  
  646.     msgRef: IPMMsgRef;
  647.     deleteMsg: BOOLEAN;
  648.     END;
  649.  
  650.  
  651.  
  652. IPMGetMsgInfoPB = RECORD
  653.     qLink: Ptr;
  654.     reservedH1: LONGINT;
  655.     reservedH2: LONGINT;
  656.     ioCompletion: ProcPtr;
  657.     ioResult: OSErr;
  658.     saveA5: LONGINT;
  659.     reqCode: INTEGER;
  660.  
  661.     msgRef: IPMMsgRef;
  662.     info: ^IPMMsgInfo;
  663.     END;
  664.  
  665.  
  666.  
  667. IPMReadHeaderPB = RECORD
  668.     qLink: Ptr;
  669.     reservedH1: LONGINT;
  670.     reservedH2: LONGINT;
  671.     ioCompletion: ProcPtr;
  672.     ioResult: OSErr;
  673.     saveA5: LONGINT;
  674.     reqCode: INTEGER;
  675.  
  676.     msgRef: IPMMsgRef;
  677.     fieldSelector: INTEGER;
  678.     offset: LONGINT;
  679.     count: LONGINT;
  680.     buffer: Ptr;
  681.     actualCount: LONGINT;
  682.     filler: INTEGER;
  683.     remaining: LONGINT;
  684.     END;
  685.  
  686.  
  687.  
  688. IPMReadRecipientPB = PACKED RECORD
  689.     qLink: Ptr;
  690.     reservedH1: LONGINT;
  691.     reservedH2: LONGINT;
  692.     ioCompletion: ProcPtr;
  693.     ioResult: OSErr;
  694.     saveA5: LONGINT;
  695.     reqCode: INTEGER;
  696.  
  697.     msgRef: IPMMsgRef;
  698.     rcptIndex: INTEGER;
  699.     offset: LONGINT;
  700.     count: LONGINT;
  701.     buffer: Ptr;
  702.     actualCount: LONGINT;
  703.     originalRcptList: BOOLEAN;
  704.     filler: Byte;
  705.     remaining: LONGINT;
  706.     nextResolution: OCERecipientOffset;
  707.     resolutionIndex: INTEGER;
  708.     originalIndex: INTEGER;
  709.     resolutionCount: Byte;
  710.     recipientOffsetFlags: OCERecipientOffsetFlags;
  711.     END;
  712.  
  713.  
  714.  
  715. {
  716. replyQueue works like recipient. [can no longer read it via ReadHeader]
  717. OriginalIndex is meaningless, rcptFlags are used seperately and there are
  718. currently none defined.
  719. }
  720. IPMReadReplyQueuePB = IPMReadRecipientPB;
  721.  
  722. IPMReadRecipientResolutionPB = IPMReadRecipientPB;
  723.  
  724.  
  725. IPMGetBlkIndexPB = RECORD
  726.     qLink: Ptr;
  727.     reservedH1: LONGINT;
  728.     reservedH2: LONGINT;
  729.     ioCompletion: ProcPtr;
  730.     ioResult: OSErr;
  731.     saveA5: LONGINT;
  732.     reqCode: INTEGER;
  733.  
  734.     msgRef: IPMMsgRef;
  735.     blockType: IPMBlockType;
  736.     index: INTEGER;
  737.     startingFrom: INTEGER;
  738.     actualBlockType: IPMBlockType;
  739.     actualBlockIndex: INTEGER;
  740.     END;
  741.  
  742.  
  743.  
  744. IPMReadMsgPB = RECORD
  745.     qLink: Ptr;
  746.     reservedH1: LONGINT;
  747.     reservedH2: LONGINT;
  748.     ioCompletion: ProcPtr;
  749.     ioResult: OSErr;
  750.     saveA5: LONGINT;
  751.     reqCode: INTEGER;
  752.  
  753.     msgRef: IPMMsgRef;
  754.     mode: IPMAccessMode;
  755.     offset: LONGINT;
  756.     count: LONGINT;
  757.     buffer: Ptr;
  758.     actualCount: LONGINT;
  759.     blockIndex: INTEGER;
  760.     remaining: LONGINT;
  761.     END;
  762.  
  763.  
  764. IPMVerifySignaturePB = RECORD
  765.     qLink: Ptr;
  766.     reservedH1: LONGINT;
  767.     reservedH2: LONGINT;
  768.     ioCompletion: ProcPtr;
  769.     ioResult: OSErr;
  770.     saveA5: LONGINT;
  771.     reqCode: INTEGER;
  772.  
  773.     msgRef: IPMMsgRef;
  774.     signatureContext: SIGContextPtr;
  775.     END;
  776.  
  777.  
  778. IPMNewMsgPB = RECORD
  779.     qLink: Ptr;
  780.     reservedH1: LONGINT;
  781.     reservedH2: LONGINT;
  782.     ioCompletion: ProcPtr;
  783.     ioResult: OSErr;
  784.     saveA5: LONGINT;
  785.     reqCode: INTEGER;
  786.  
  787.     filler: LONGINT;
  788.     recipient: ^OCERecipient;
  789.     replyQueue: ^OCERecipient;
  790.     procHint: StringPtr;
  791.     filler2: INTEGER;
  792.     msgType: ^IPMMsgType;
  793.     refCon: LONGINT;
  794.     newMsgRef: IPMMsgRef;
  795.     filler3: INTEGER;
  796.     filler4: LONGINT;
  797.     identity: AuthIdentity;
  798.     sender: ^IPMSender;
  799.     internalUse: LONGINT;
  800.     internalUse2: LONGINT;
  801.     END;
  802.  
  803.  
  804. IPMNewHFSMsgPB = RECORD
  805.     qLink: Ptr;
  806.     reservedH1: LONGINT;
  807.     reservedH2: LONGINT;
  808.     ioCompletion: ProcPtr;
  809.     ioResult: OSErr;
  810.     saveA5: LONGINT;
  811.     reqCode: INTEGER;
  812.  
  813.     hfsPath: ^FSSpec;
  814.     recipient: ^OCERecipient;
  815.     replyQueue: ^OCERecipient;
  816.     procHint: StringPtr;
  817.     filler2: INTEGER;
  818.     msgType: ^IPMMsgType;
  819.     refCon: LONGINT;
  820.     newMsgRef: IPMMsgRef;
  821.     filler3: INTEGER;
  822.     filler4: LONGINT;
  823.     identity: AuthIdentity;
  824.     sender: ^IPMSender;
  825.     internalUse: LONGINT;
  826.     internalUse2: LONGINT;
  827.     END;
  828.  
  829.  
  830. IPMNestMsgPB = RECORD
  831.     qLink: Ptr;
  832.     reservedH1: LONGINT;
  833.     reservedH2: LONGINT;
  834.     ioCompletion: ProcPtr;
  835.     ioResult: OSErr;
  836.     saveA5: LONGINT;
  837.     reqCode: INTEGER;
  838.  
  839.     msgRef: IPMMsgRef;
  840.     filler: ARRAY[1..9] OF INTEGER;
  841.     refCon: LONGINT;
  842.     msgToNest: IPMMsgRef;
  843.     filler2: INTEGER;
  844.     startingOffset: LONGINT;
  845.     END;
  846.  
  847.  
  848.  
  849. IPMNewNestedMsgBlockPB = RECORD
  850.     qLink: Ptr;
  851.     reservedH1: LONGINT;
  852.     reservedH2: LONGINT;
  853.     ioCompletion: ProcPtr;
  854.     ioResult: OSErr;
  855.     saveA5: LONGINT;
  856.     reqCode: INTEGER;
  857.  
  858.     msgRef: IPMMsgRef;
  859.     recipient: ^OCERecipient;
  860.     replyQueue: ^OCERecipient;
  861.     procHint: StringPtr;
  862.     filler1: INTEGER;
  863.     msgType: ^IPMMsgType;
  864.     refCon: LONGINT;
  865.     newMsgRef: IPMMsgRef;
  866.     filler2: INTEGER;
  867.     startingOffset: LONGINT;
  868.     identity: AuthIdentity;
  869.     sender: ^IPMSender;
  870.     internalUse: LONGINT;
  871.     internalUse2: LONGINT;
  872.     END;
  873.  
  874.  
  875.  
  876. IPMEndMsgPB = PACKED RECORD
  877.     qLink: Ptr;
  878.     reservedH1: LONGINT;
  879.     reservedH2: LONGINT;
  880.     ioCompletion: ProcPtr;
  881.     ioResult: OSErr;
  882.     saveA5: LONGINT;
  883.     reqCode: INTEGER;
  884.  
  885.     msgRef: IPMMsgRef;
  886.     msgID: IPMMsgID;
  887.     msgTitle: ^RString;
  888.     deliveryNotification: IPMNotificationType;
  889.     priority: IPMPriority;
  890.     cancel: BOOLEAN;
  891.     padByte: Byte;
  892.     reserved: LONGINT;
  893.     signature: SIGSignaturePtr;
  894.     signatureSize: Size;
  895.     signatureContext: SIGContextPtr;
  896.     family: OSType;                                { family this msg belongs (e.g. mail) }
  897.                                                 { use kIPMFamilyUnspecified by default }
  898.     END;
  899.  
  900.  
  901.  
  902. IPMAddRecipientPB = RECORD
  903.     qLink: Ptr;
  904.     reservedH1: LONGINT;
  905.     reservedH2: LONGINT;
  906.     ioCompletion: ProcPtr;
  907.     ioResult: OSErr;
  908.     saveA5: LONGINT;
  909.     reqCode: INTEGER;
  910.  
  911.     msgRef: IPMMsgRef;
  912.     recipient: ^OCERecipient;
  913.     reserved: LONGINT;
  914.     END;
  915.  
  916.  
  917.  
  918. IPMAddReplyQueuePB = RECORD
  919.     qLink: Ptr;
  920.     reservedH1: LONGINT;
  921.     reservedH2: LONGINT;
  922.     ioCompletion: ProcPtr;
  923.     ioResult: OSErr;
  924.     saveA5: LONGINT;
  925.     reqCode: INTEGER;
  926.  
  927.     msgRef: IPMMsgRef;
  928.     filler: LONGINT;
  929.     replyQueue: ^OCERecipient;
  930.     END;
  931.  
  932.  
  933.  
  934. IPMNewBlockPB = RECORD
  935.     qLink: Ptr;
  936.     reservedH1: LONGINT;
  937.     reservedH2: LONGINT;
  938.     ioCompletion: ProcPtr;
  939.     ioResult: OSErr;
  940.     saveA5: LONGINT;
  941.     reqCode: INTEGER;
  942.  
  943.     msgRef: IPMMsgRef;
  944.     blockType: IPMBlockType;
  945.     filler: ARRAY[1..5] OF INTEGER;
  946.     refCon: LONGINT;
  947.     filler2: ARRAY[1..3] OF INTEGER;
  948.     startingOffset: LONGINT;
  949.     END;
  950.  
  951.  
  952.  
  953. IPMWriteMsgPB = RECORD
  954.     qLink: Ptr;
  955.     reservedH1: LONGINT;
  956.     reservedH2: LONGINT;
  957.     ioCompletion: ProcPtr;
  958.     ioResult: OSErr;
  959.     saveA5: LONGINT;
  960.     reqCode: INTEGER;
  961.  
  962.     msgRef: IPMMsgRef;
  963.     mode: IPMAccessMode;
  964.     offset: LONGINT;
  965.     count: LONGINT;
  966.     buffer: Ptr;
  967.     actualCount: LONGINT;
  968.     currentBlock: BOOLEAN;
  969.     END;
  970.  
  971.  
  972.  
  973.  
  974. IPMParamBlock = RECORD
  975.     CASE INTEGER OF
  976.          1:    (header: IPMParamHeader);
  977.          2:    (openContextPB: IPMOpenContextPB);
  978.          3:    (closeContextPB: IPMCloseContextPB);
  979.          4:    (createQueuePB: IPMCreateQueuePB);
  980.          5:    (deleteQueuePB: IPMDeleteQueuePB);
  981.          6:    (openQueuePB: IPMOpenQueuePB);
  982.          7:    (closeQueuePB: IPMCloseQueuePB);
  983.          8:    (enumerateQueuePB: IPMEnumerateQueuePB);
  984.          9:    (changeQueueFilterPB: IPMChangeQueueFilterPB);
  985.         10:    (deleteMsgRangePB: IPMDeleteMsgRangePB);
  986.         11:    (openMsgPB: IPMOpenMsgPB);
  987.         12:    (openHFSMsgPB: IPMOpenHFSMsgPB);
  988.         13:    (openBlockAsMsgPB: IPMOpenBlockAsMsgPB);
  989.         14:    (closeMsgPB: IPMCloseMsgPB);
  990.         15:    (getMsgInfoPB: IPMGetMsgInfoPB);
  991.         16:    (readHeaderPB: IPMReadHeaderPB);
  992.         17:    (readRecipientPB: IPMReadRecipientPB);
  993.         18:    (readReplyQueuePB: IPMReadReplyQueuePB);
  994.         19:    (readRecipientBRPB: IPMReadRecipientResolutionPB);
  995.         20:    (getBlkIndexPB: IPMGetBlkIndexPB);
  996.         21:    (readMsgPB: IPMReadMsgPB);
  997.         22:    (verifySignaturePB: IPMVerifySignaturePB);
  998.         23:    (newMsgPB: IPMNewMsgPB);
  999.         24:    (newHFSMsgPB: IPMNewHFSMsgPB);
  1000.         25:    (nestMsgPB: IPMNestMsgPB);
  1001.         26:    (newNestedMsgBlockPB: IPMNewNestedMsgBlockPB);
  1002.         27:    (endMsgPB: IPMEndMsgPB);
  1003.         28:    (addRecipientPB: IPMAddRecipientPB);
  1004.         29:    (addReplyQueuePB: IPMAddReplyQueuePB);
  1005.         30:    (newBlockPB: IPMNewBlockPB);
  1006.         31:    (writeMsgPB: IPMWriteMsgPB);
  1007.     END;
  1008.  
  1009. IPMParamBlockPtr = ^IPMParamBlock;
  1010.  
  1011. CONST
  1012. {    Request codes }
  1013. kIPMOpenContext                = $400;
  1014. kIPMCloseContext            = $401;
  1015. kIPMNewMsg                    = $402;
  1016. kIPMAddRecipient            = $403;
  1017. kIPMNewBlock                = $404;
  1018. kIPMNewNestedMsgBlock        = $405;
  1019. kIPMNestMsg                    = $406;
  1020. kIPMWriteMsg                = $407;
  1021. kIPMEndMsg                    = $408;
  1022. kIPMOpenQueue                = $409;
  1023. kIPMCloseQueue                = $40A;
  1024. kIPMOpenMsg                    = $40B;
  1025. kIPMCloseMsg                = $40C;
  1026. kIPMReadMsg                    = $40D;
  1027. kIPMReadHeader                = $40E;
  1028. kIPMOpenBlockAsMsg            = $40F;
  1029. kIPMReadRecipient            = $410;
  1030. kIPMCreateQueue                = $411;
  1031. kIPMDeleteQueue                = $412;
  1032. kIPMEnumerateQueue            = $413;
  1033. kIPMChangeQueueFilter        = $414;
  1034. kIPMDeleteMsgRange            = $415;
  1035. kIPMOpenHFSMsg                = $417;
  1036. kIPMGetBlkIndex                = $418;
  1037. kIPMGetMsgInfo                = $419;
  1038. kIPMReadRecipientBR            = $41A;
  1039. kIPMAddReplyQueue            = $41D;
  1040. kIPMNewHFSMsg                = $41E;
  1041.  
  1042. kIPMReadReplyQueue            = $421;
  1043. kIPMVerifySignature            = $422;
  1044.  
  1045.  
  1046.  
  1047.  
  1048. FUNCTION IPMOpenContext(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1049.     INLINE $3F3C, kIPMOpenContext, _oceTBDispatch;
  1050.  
  1051. FUNCTION IPMCloseContext(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1052.     INLINE $3F3C, kIPMCloseContext, _oceTBDispatch;
  1053.  
  1054. FUNCTION IPMNewMsg(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1055.     INLINE $3F3C, kIPMNewMsg, _oceTBDispatch;
  1056.  
  1057. FUNCTION IPMNewBlock(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1058.     INLINE $3F3C, kIPMNewBlock, _oceTBDispatch;
  1059.  
  1060. FUNCTION IPMNewNestedMsgBlock(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1061.     INLINE $3F3C, kIPMNewNestedMsgBlock, _oceTBDispatch;
  1062.  
  1063. FUNCTION IPMNestMsg(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1064.     INLINE $3F3C, kIPMNestMsg, _oceTBDispatch;
  1065.  
  1066. FUNCTION IPMWriteMsg(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1067.     INLINE $3F3C, kIPMWriteMsg, _oceTBDispatch;
  1068.  
  1069. FUNCTION IPMEndMsg(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1070.     INLINE $3F3C, kIPMEndMsg, _oceTBDispatch;
  1071.  
  1072. FUNCTION IPMOpenQueue(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1073.     INLINE $3F3C, kIPMOpenQueue, _oceTBDispatch;
  1074.  
  1075. FUNCTION IPMCloseQueue(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1076.     INLINE $3F3C, kIPMCloseQueue, _oceTBDispatch;
  1077.  
  1078. FUNCTION IPMVerifySignature(paramBlock: IPMParamBlockPtr): OSErr;        { Always synchronous }
  1079.     INLINE $7000, $1f00, $3F3C, kIPMVerifySignature, _oceTBDispatch;
  1080.  
  1081. FUNCTION IPMOpenMsg(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1082.     INLINE $3F3C, kIPMOpenMsg, _oceTBDispatch;
  1083.  
  1084. FUNCTION IPMCloseMsg(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1085.     INLINE $3F3C, kIPMCloseMsg, _oceTBDispatch;
  1086.  
  1087. FUNCTION IPMReadMsg(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1088.     INLINE $3F3C, kIPMReadMsg, _oceTBDispatch;
  1089.  
  1090. FUNCTION IPMReadHeader(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1091.     INLINE $3F3C, kIPMReadHeader, _oceTBDispatch;
  1092.  
  1093. FUNCTION IPMOpenBlockAsMsg(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1094.     INLINE $3F3C, kIPMOpenBlockAsMsg, _oceTBDispatch;
  1095.  
  1096. FUNCTION IPMNewHFSMsg(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1097.     INLINE $3F3C, kIPMNewHFSMsg, _oceTBDispatch;
  1098.  
  1099. FUNCTION IPMReadRecipient(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1100.     INLINE $3F3C, kIPMReadRecipient, _oceTBDispatch;
  1101.  
  1102. FUNCTION IPMReadReplyQueue(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1103.     INLINE $3F3C, kIPMReadReplyQueue, _oceTBDispatch;
  1104.  
  1105. FUNCTION IPMCreateQueue(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1106.     INLINE $3F3C, kIPMCreateQueue, _oceTBDispatch;
  1107.  
  1108. FUNCTION IPMDeleteQueue(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1109.     INLINE $3F3C, kIPMDeleteQueue, _oceTBDispatch;
  1110.  
  1111. FUNCTION IPMEnumerateQueue(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1112.     INLINE $3F3C, kIPMEnumerateQueue, _oceTBDispatch;
  1113.  
  1114. FUNCTION IPMChangeQueueFilter(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1115.     INLINE $3F3C, kIPMChangeQueueFilter, _oceTBDispatch;
  1116.  
  1117. FUNCTION IPMDeleteMsgRange(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1118.     INLINE $3F3C, kIPMDeleteMsgRange, _oceTBDispatch;
  1119.  
  1120. FUNCTION IPMAddRecipient(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1121.     INLINE $3F3C, kIPMAddRecipient, _oceTBDispatch;
  1122.  
  1123. FUNCTION IPMAddReplyQueue(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1124.     INLINE $3F3C, kIPMAddReplyQueue, _oceTBDispatch;
  1125.  
  1126. FUNCTION IPMOpenHFSMsg(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1127.     INLINE $3F3C, kIPMOpenHFSMsg, _oceTBDispatch;
  1128.  
  1129. FUNCTION IPMGetBlkIndex(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1130.     INLINE $3F3C, kIPMGetBlkIndex, _oceTBDispatch;
  1131.  
  1132. FUNCTION IPMGetMsgInfo(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1133.     INLINE $3F3C, kIPMGetMsgInfo, _oceTBDispatch;
  1134.  
  1135. FUNCTION IPMReadRecipientBR(paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
  1136.     INLINE $3F3C, kIPMReadRecipientBR, _oceTBDispatch;
  1137.  
  1138.  
  1139.  
  1140.  
  1141. {**************************************************************************************}
  1142. { EXTERNAL ROUTINES }
  1143.  
  1144. CONST
  1145. kOCESizePackedRecipient        = 830;
  1146. kOCEPackRecipient            = 831;
  1147. kOCEUnpackRecipient            = 832;
  1148. kOCEStreamRecipient            = 833;
  1149. kOCEGetRecipientType        = 834;
  1150. kOCESetRecipientType        = 835;
  1151.  
  1152. kOCEPackedRecipientToString            = 840;
  1153. kOCESizePackedRecipientToString        = 841;
  1154. kOCEPackedRecipientXtnToString        = 842;
  1155. kOCESizePackedRecipientXtnToString    = 843;
  1156. kOCEStringToPackedRecipient            = 844;
  1157. kOCESizeStringToPackedRecipient        = 845;
  1158.  
  1159.  
  1160.  
  1161. {
  1162. Compute the space that a OCERecipient would take if it were in packed
  1163. form.  [Note: does NOT even pad extensionSize, so you may get an odd #back out]
  1164. Safe to pass dereferenced handle(s).
  1165. }
  1166.  
  1167. FUNCTION OCESizePackedRecipient(rcpt: OCERecipient): INTEGER;
  1168.     INLINE $303C, kOCESizePackedRecipient, $AA5C;
  1169.  
  1170.  
  1171. {
  1172. Take an OCERecipient (scatter) and (gather) stream into the specified
  1173. buffer.  It is assumed that there is sufficient space in the buffer (that is
  1174. OCESizePackedRecipient).  Safe to pass dereferenced handle(s).
  1175. }
  1176. FUNCTION OCEPackRecipient(rcpt: OCERecipient; buffer: UNIV Ptr): INTEGER;
  1177.     INLINE $303C, kOCEPackRecipient, $AA5C;
  1178.  
  1179. {
  1180. Take a packed OCERecipient and cast a the OCERecipient frame over it. Returns
  1181. amBadDestId if it doesn't look like an OCERecipient. Safe to pass dereferenced
  1182. handle(s).
  1183. }
  1184. FUNCTION OCEUnpackRecipient(buffer: UNIV Ptr; VAR rcpt: OCERecipient;
  1185.         VAR entitySpecifier: RecordID): OSErr;
  1186.     INLINE $303C, kOCEUnpackRecipient, $AA5C;
  1187.  
  1188.  
  1189. {
  1190. Take an OCERecipient (scatter) and (gather) stream using the specified
  1191. function.  Safe to pass dereferenced handle(s).  If streamer function returns
  1192. OCEError OCEStreamRecipient stops execution and passes the error back to the caller
  1193. }
  1194.  
  1195. TYPE
  1196. OCERecipientStreamer = ProcPtr;
  1197.     { FUNCTION OCERecipientStreamer(
  1198.         VAR buffer: void; count: LONGINT; eof: BOOLEAN; userData: LONGINT): OSErr;}
  1199.  
  1200.  
  1201.  
  1202. FUNCTION OCEStreamRecipient(rcpt: OCERecipient; stream: OCERecipientStreamer;
  1203.         userData: LONGINT; VAR actualCount: LONGINT): OSErr;
  1204.     INLINE $303C, kOCEStreamRecipient, $AA5C;
  1205.  
  1206.  
  1207. { Get the OCERecipient's extensionType. Safe to pass dereferenced handle(s).}
  1208.  
  1209. FUNCTION OCEGetRecipientType(cid: CreationID): OSType;
  1210.     INLINE $303C, kOCEGetRecipientType, $AA5C;
  1211.  
  1212.  
  1213. {
  1214. Set the OCERecipient's extensionType in the specified cid.  (Note: we do NOT
  1215. check for a nil pointer).  If the extensionType is 'entn', the cid is assumed
  1216. to be "valid" and is not touched.  Note: to properly handle non 'entn''s this
  1217. routine must and will zero the high LONGINT (source) of the cid! Safe to pass
  1218. dereferenced handle(s).
  1219. }
  1220. PROCEDURE OCESetRecipientType(extensionType: OSType; VAR cid: CreationID);
  1221.     INLINE $303C, kOCESetRecipientType, $AA5C;
  1222.  
  1223.  
  1224.  
  1225. { string to address functions  *** YOU MAY NOT CALL THESE AT INTERRUPT TIME }
  1226.  
  1227. {
  1228. Return the indicated recipient in the string format in the string buffer.
  1229. The CharacterSet and length of the string are also returned.
  1230. }
  1231.  
  1232. FUNCTION OCEPackedRecipientToString(VAR rcpt: OCEPackedRecipient; str: StringPtr;
  1233.         VAR strLength: INTEGER; VAR script: CharacterSet): OSErr;
  1234.     INLINE $303C, kOCEPackedRecipientToString, $AA5C;
  1235.  
  1236.  
  1237. { Return the length of indicated recipient in the string format. }
  1238.  
  1239. FUNCTION OCESizePackedRecipientToString(VAR rcpt: OCEPackedRecipient; VAR strLength: INTEGER): OSErr;
  1240.     INLINE $303C, kOCESizePackedRecipientToString, $AA5C;
  1241.  
  1242.  
  1243. {
  1244. Return the xtn value of indicated recipient in the string format in the string buffer.
  1245. The CharacterSet, length  and extensionType of the string are also returned.
  1246. }
  1247.  
  1248. FUNCTION OCEPackedRecipientXtnToString(VAR rcpt: OCEPackedRecipient; str: StringPtr;
  1249.         VAR strLength: INTEGER; VAR extensionType: OSType; VAR script: CharacterSet): OSErr;
  1250.     INLINE $303C, kOCEPackedRecipientXtnToString, $AA5C;
  1251.  
  1252.  
  1253. { Return the length of the xtn value of indicated recipient in the string format. }
  1254.  
  1255. FUNCTION OCESizePackedRecipientXtnToString(VAR rcpt: OCEPackedRecipient; VAR strLength: INTEGER): OSErr;
  1256.     INLINE $303C, kOCESizePackedRecipientXtnToString, $AA5C;
  1257.  
  1258.  
  1259. { Return the indicated recipient in the OCEPackedRecipient format in the rcpt buffer. }
  1260.  
  1261. FUNCTION OCEStringToPackedRecipient(str: StringPtr; VAR packedRecipientLength: INTEGER;
  1262.         VAR script: CharacterSet; VAR rcpt: OCEPackedRecipient): OSErr;
  1263.     INLINE $303C, kOCEStringToPackedRecipient, $AA5C;
  1264.  
  1265. { Return the length of the indicated recipient in the OCEPackedRecipient format. }
  1266.  
  1267. FUNCTION OCESizeStringToPackedRecipient(str: StringPtr; VAR strLength: INTEGER;
  1268.         VAR script: CharacterSet; VAR packedRecipientLength: INTEGER): OSErr;
  1269.     INLINE $303C, kOCESizeStringToPackedRecipient, $AA5C;
  1270.  
  1271.  
  1272. {$ENDC}    { UsingOCEMessaging }
  1273.  
  1274. {$IFC NOT UsingIncludes}
  1275.     END.
  1276. {$ENDC}
  1277.